$(function($){
	$.ajax({
		type:"get",
		url:"../json/fujin.json",
		dataType:'json',
		success:function(data){
			var str=template('scr',{arr:data})
			$('.as').html(str);
		}
	});
var mySwiper = new Swiper('.top', {
        slidesPerView: 4,
    });
    var tabSwiper = new Swiper('.bottom', {
        speed: 500,
        initialSlide: 0,
        onSlideChangeStart: function (tabSwiper) {
            var index = tabSwiper.activeIndex;
            $(".top .zx").removeClass('zx');
            $(".top a").eq(index).addClass('zx');
            mySwiper.slideTo(index);
        }
    });
    $(".top .swiper-slide").on('touchstart mousedown', function (e) {
        e.preventDefault();
        var $this = $(this);
        if (!$this.hasClass('zx')){
            $(".top .zx").removeClass('zx');
            $(this).children('a').addClass('zx');
            tabSwiper.slideTo($(this).index());
            mySwiper.slideTo($(this).index());
        }
    });
    var yours= new Swiper('.center', {
        speed: 500,
        initialSlide: 0,
    });
})